<?php
require_once('../includes/init.php');
$domain = "https://www.pentalink.com";
?>
<?php include('./header.php');?>
<?php
/**/
$conditions = "`cate_id`='1' AND `is_avail`='1'";
$sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `gundong` WHERE ".$conditions." ORDER BY `cate_id`,`is_order` DESC,`sort_order`;";
if($_REQUEST['lp']) echo $sql;
$gundong_list = $db->getAll($sql);

$sql = "SELECT * FROM `product_cate_first`";
$cate = $db->getAll($sql);

foreach($cate as &$cateItem){
    $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `product_cate` WHERE `parent_id`='0' AND `is_index`='1' AND `is_del`='0' AND `bigcate_id`='1' AND `first_cate_id` = {$cateItem['id']} ORDER BY `is_order` DESC, `sort_order`;";
    $cate_list = $db->getAll($sql);
    foreach($cate_list as &$cateDetail){
        $sqlS = " `parent_id`='".$cateDetail['cate_id']."' AND";
        $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `product_cate` WHERE {$sqlS} `is_del`='0' AND `product_num`>'0' ORDER BY `is_order` DESC, `sort_order`;";
        $cate_list_detail = $db->getAll($sql);
        $cateDetail["detail"] = $cate_list_detail;
    }
    $cateItem["list"] = $cate_list;
}

$sql = "SELECT * from links where cate= 1 order by link_id desc limit 3";
$link_list = $db->getAll($sql);
$_GET["from_page"] = "index";
?>

            <!-- 头部搜索框以及导航栏 -->
            <div class="header_div">
                <?php include('./common/search.php');?>
                <?php include('./common/nav.php');?>
            </div>
            <!-- 头部分类内容展示 -->
            <div class="headitem_box">
                <div class="headitem_fl_box">
                    <div class="fenlei_block">
                        <div class="headitem_fl_content_box box">
                            <div class="headitem_list_block box">
                                <?php   
                                if(!empty($cate)):
                                foreach($cate as $key1 => $cate1):  
                                ?>
                                <div class="move_input">
                                    <a href="./product.php?cate_id=<?php echo $cate1["list"][0]["cate_id"]; ?>">
                                        <div id="tankuang_content_item_<?php echo $cate1["id"] ?>" class="headitem_list_menu box" style="background-image: url(/img/<?php echo $cate1['img']<>''?$cate1['img']:'/none.jpg';?>);">
                                            <p><?php echo $cate1['name'];?></br>
                                                <span>
                                                    <?php foreach($cate1["list"] as $key2 => $cate2):  ?>
                                                        <?php echo $cate2['cate_name'];?>
                                                    <?php endforeach;?>
                                                </span>
                                            </p>
                                        </div>
                                    </a>
                                    
                                    <div class="headitem_list_block_tankuang box">
                                        <div class="tankuang_content">
                                            <?php   
                                            if(!empty($cate1["list"])):
                                            foreach($cate1["list"] as $key2 => $cate2):  
                                            ?>
                                                <div class="tankuang_content_item box tankuang_content_item_<?php echo $cate1["id"] ?>">
                                                    <p class="box"><a href="./product.php?cate_id=<?php echo $cate2["cate_id"]; ?>"><?php echo $cate2['cate_name']; ?></a></p>
                                                    <ul class="box">
                                                        <?php foreach($cate2["detail"] as $key3 => $cate3):  ?>
                                                            <li><a href="./product.php?cate_id=<?php echo $cate3["cate_id"]; ?>"><?php echo $cate3['cate_name'];?></a></li>
                                                        <?php endforeach;?>
                                                    </ul>
                                                </div>
                                            <?php endforeach;?>
                                            <?php endif;?>
                                        </div>
                                    </div>
                                </div>
                                
                                <?php endforeach;?>
                                <?php endif;?>
                            </div>
                        </div>
                        
                        <div class="headitem_list_block_banner">
                            <div class="swiper-container">
                                <div class="swiper-wrapper">
                                    <?php if(!empty($gundong_list)): ?>
                                        <?php foreach($gundong_list as $key => $list): ?>
                                            <div class="swiper-slide"><a href="<?php echo $list['url'];?>"><img src="/upload<?php echo $list['pic'];?>" alt="banner图"></a></div>
                                        <?php endforeach; ?>
                                    <?php endif /**/?>
                                </div>
                                <div class="swiper-pagination"></div>
                           </div>
                        </div>
                    </div>
                   
                    <!-- <div class="item_fl_tip_box box">
                        <div class="zuixinzixun"><span>最新</span><img src="../img/zixun.jpg" alt="咨讯"></div>
                        <ul class="zixun_list">
                            <li>关于春节放假的通知</li>
                            <li>不容错过，2022版全新3D模型库打包上线</li>
                            <li>关于春节放假的通知</li>
                        </ul>
                    </div> -->

                </div>

                
                <!-- 新版-未登录 -->
                <?php if($_SESSION[SESSION_PREFIX]['user_id']=='' || $_SESSION[SESSION_PREFIX]['user_id']=='0'):?>
                    <div class="item_fr_box box">
                        <div class="user_avtar"><img src="../img/zhulisheji.jpg" alt="头像"></div>
                        <div class="user_welcom">Hi~您好</div>
                        <div class="btn_block btn_denglu showLoginBtn"><a>欢迎登录</a></div>
                        <div class="btn_block btn_forget"><a href="/member/findpwd.php">忘记密码</a></div>
                        <div class="btn_block btn_zhucenew"><a href="/member/register.php">注册新用户</a></div>
                        
                        <div class="tzgg_block">
                            <h2 class="tzgg_block_h2 box">通知公告</h2>
                            <ul class="tzgg_block_ul">
                            <?php
                                $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `article` WHERE cate_id = 21 and is_del = 0 ORDER BY `add_tm` DESC, `article_id` limit 3;";
                                if($_REQUEST['lp']) echo $sql;
                                $article_list = $db->getAll($sql);
                                ?>
                                <?php
                                if(!empty($article_list)):
                                foreach($article_list as $key => $list):
                                ?>
                                    <a style="display: inherit;" href="/new/newsdetail.php?id=<?php echo $list['article_id'];?>" title="<?php echo $list['title'];?>">
                                        <li class="box ellipsis"><?php echo $list["title"]; ?></li>
                                    </a>
                                <?php endforeach; ?>
                                <?php endif; ?>
                            </ul>
                        </div>
                    </div>
                <?php else:?>
                    <!-- 新版-已登录 -->
                    <div class="item_fr_box box">
                        <div class=" btn_block btn_denglu" ><a onclick="location.href='./login.php?act=logout'">退出登录</a></div>
                        <div class="cgcy_block">
                            <h2 class="cgcy_block_h2 box">采购常用</h2>
                            <ul class="cgcy_block_ul">
                                <li>
                                    <div>
                                        <a href="<?php echo $domain; ?>/newmember/booking.php">
                                            <img src="../img/ico_index_dingdan.png" alt="77">
                                            <p>订单管理<span></span></p>
                                        </a>
                                    </div>
                                    
                                </li>
                                <li>
                                    <div>
                                        <a href="<?php echo $domain; ?>/newmember/fapiao.php">
                                            <img src="../img/ico_index_fapiao.png" alt="77">
                                            <p>发票管理<span></span></p>
                                        </a>
                                    </div>
                                
                                </li>
                                
                                <li>
                                    <div>
                                        <a href="<?php echo $domain; ?>/newmember/3ddownload.php">
                                            <img src="../img/ico_index_xiazai.png" alt="77">
                                            <p>下载管理</p>
                                        </a>
                                    </div>
                                    
                                </li>
                                <li>
                                    <div>
                                        <a href="<?php echo $domain; ?>/newmember/shoucang.php">
                                            <img src="../img/ico_index_shoucang.png" alt="77">
                                            <p>我的收藏</p>
                                        </a>
                                    </div>
                                    
                                </li>
                                <li>
                                    <div>
                                        <a href="<?php echo $domain; ?>/newmember/liulan.php">
                                            <img src="../img/ico_index_guanzhu.png" alt="77">
                                            <p>我的浏览</p>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div>
                                        <a href="./news.php?cate_id=12">
                                            <img src="../img/ico_index_zixun.png" alt="77">
                                            <p>产品资讯</p>
                                        </a>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="tzgg_block">
                            <h2 class="tzgg_block_h2 box">通知公告</h2>
                            <ul class="tzgg_block_ul">
                            <?php
                                $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `article` WHERE cate_id = 21 and is_del = 0 ORDER BY `add_tm` DESC, `article_id` limit 3;";
                                if($_REQUEST['lp']) echo $sql;
                                $article_list = $db->getAll($sql);
                                ?>
                                <?php
                                if(!empty($article_list)):
                                foreach($article_list as $key => $list):
                                ?>
                                    <a style="display: inherit;" href="/new/newsdetail.php?id=<?php echo $list['article_id'];?>" title="<?php echo $list['title'];?>">
                                        <li class="box ellipsis"><?php echo $list["title"]; ?></li>
                                    </a>
                                <?php endforeach; ?>
                                <?php endif; ?>
                            </ul>
                        </div>
                    </div>
                <?php endif;?>

                <!-- <div class="item_fr_box box">
                    <div class="cgcy_block">
                        <h2 class="cgcy_block_h2 box">采购常用</h2>
                        <ul class="cgcy_block_ul">
                            <li>
                                <div>
                                    <img src="../img/77_1.jpg" alt="77">
                                    <p>订单管理<span>(7)</span></p>
                                </div>
                                
                            </li>
                            <li>
                                <div>
                                    <img src="../img/77_2.jpg" alt="77">
                                    <p>报价单<span>(7)</span></p>
                                </div>
                               
                            </li>
                            <li>
                                <div>
                                    <img src="../img/77_3.jpg" alt="77">
                                    <p>发票管理<span>(7)</span></p>
                                    <p class="tip">纸质/电子档</p>
                                </div>
                                
                            </li>
                            <li>
                                <div>
                                    <img src="../img/77_4.jpg" alt="77">
                                    <p>下载管理</p>
                                    <p class="tip">立即下载</p>
                                </div>
                                
                            </li>
                            <li>
                                <div>
                                    <img src="../img/77_5.jpg" alt="77">
                                    <p>个性定制</p>
                                    <p class="tip">助力设计</p>
                                </div>
                                
                            </li>
                            <li>
                                <div>
                                    <img src="../img/77_6.jpg" alt="77">
                                    <p>产品咨讯</p>
                                    <p class="tip">更多咨讯</p>
                                </div>
                                
                            </li>

                        </ul>
                    </div>
                    <div class="tzgg_block">
                        <h2 class="tzgg_block_h2 box">通知公告</h2>
                        <ul class="tzgg_block_ul">
                            <li class="box ellipsis">义文五金国庆节放假通知</li>
                            <li class="box ellipsis" >传动部件有哪些优势</li>
                            <li class="box ellipsis">传动部件有哪些优势</li>
                        </ul>
                    </div>
                    <div class="btn_block">
                        <div class="btn_denglu btn_block_it"><a>登录</a></div>
                        <div class="btn_zhuce btn_block_it"><a>注册</a></div>
                    </div>
                    <div class="item_fr_box_img">
                        <img src="../img/11.jpg" alt="户外图">
                    </div>
                </div> -->

            </div>

            <!-- 中间模块内容 -->
            <div class="wrap_content">
                <!-- 标签 -->
                <!-- <ul class="module_view">
                    <li class="box" style="background-image: url(../img/donlow_bg1.png);">
                        <a target="_blank">
                            <img src="../img/77_7.png" alt="">
                            <p>在线3D模型下载<br/><span>现场多种零件模型选择</span></p>
                        </a>
                    </li>
                    <li class="box" style="background-image: url(../img/donlow_bg2.png);">
                        <a target="_blank">
                            <img src="../img/77_8.png" alt="">
                            <p>集合搜索3D模型下载<br/><span>一键导入检索轻松自如</span></p>
                        </a>
                    </li>
                    <li class="box">
                        <a target="_blank">
                            <img src="../img/77_9.png" alt="">
                            <p>草图搜索3D模型下载<br/><span>在线快速配对近似模拟</span></p>
                        </a>
                    </li>
                
                </ul> -->

                <!-- 模块一 -->
                <!-- <div class="firatwo_block">
                    <div class="wrap_block jsxx_block box">
                        <h1 class="box"><span class="tip_title">计算选型</span><span  class="fr_else">查看更多></span></h1>
                        <div class="jsxx_content">
                            <div class="jsxx_fl_img">
                                <img src="../img/zhulisheji.jpg" alt="">
                                <p>查看更多+</p>
                            </div>
                            <div class="jsxx_fr_content">
                                <ul>
                                    <li>
                                        <div class="jsxx_fr_menu">
                                            <h2>圆形弹簧计算选型</h2>
                                            <p>通过输入产品参数，如材质、负载、工作高度等，筛选推荐合适的标准型号或定制标号</p>
                                        </div>
                                        <div class="jsxx_fr_img">
                                            <img src="../img/lingjian.jpg" alt="零件图片">
                                        </div>
                                    </li>
                                    <li>
                                        <div class="jsxx_fr_menu">
                                            <h2>圆形弹簧计算选型</h2>
                                            <p>通过输入产品参数，如材质、负载、工作高度等，筛选推荐合适的标准型号或定制标号</p>
                                        </div>
                                        <div class="jsxx_fr_img">
                                            <img src="../img/lingjian.jpg" alt="零件图片">
                                        </div>
                                    </li>
                                    <li>
                                        <div class="jsxx_fr_menu">
                                            <h2>圆形弹簧计算选型</h2>
                                            <p>通过输入产品参数，如材质、负载、工作高度等，筛选推荐合适的标准型号或定制标号</p>
                                        </div>
                                        <div class="jsxx_fr_img">
                                            <img src="../img/lingjian.jpg" alt="零件图片">
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="wrap_block cpmx_block box">
                        <h1 class="box"><span class="tip_title">产品模型</span><span  class="fr_else">查看更多></span></h1>
                        <div class="jsxx_content">
                            <div class="jsxx_fl_img">
                                <img src="../img/shiyongguifan.jpg" alt="使用规范">
                                <p>查看更多+</p>
                            </div>
                            <div class="jsxx_fr_content">
                                <ul>
                                    <li>
                                        <div class="jsxx_fr_menu">
                                            <h2>圆形弹簧计算选型</h2>
                                            <p>通过输入产品参数，如材质、负载、工作高度等，筛选推荐合适的标准型号或定制标号</p>
                                        </div>
                                        <div class="jsxx_fr_img">
                                            <img src="../img/lingjian.jpg" alt="零件图片">
                                        </div>
                                    </li>
                                    <li>
                                        <div class="jsxx_fr_menu">
                                            <h2>圆形弹簧计算选型</h2>
                                            <p>通过输入产品参数，如材质、负载、工作高度等，筛选推荐合适的标准型号或定制标号</p>
                                        </div>
                                        <div class="jsxx_fr_img">
                                            <img src="../img/lingjian.jpg" alt="零件图片">
                                        </div>
                                    </li>
                                    <li>
                                        <div class="jsxx_fr_menu">
                                            <h2>圆形弹簧计算选型</h2>
                                            <p>通过输入产品参数，如材质、负载、工作高度等，筛选推荐合适的标准型号或定制标号</p>
                                        </div>
                                        <div class="jsxx_fr_img">
                                            <img src="../img/lingjian.jpg" alt="零件图片">
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        
                    </div>

                </div> -->

                <!-- 推荐榜 -->
                <div class="wrap_block tjb_block box">
                    <h1 class="box"><span class="tip_title">推荐榜</span>
                    </h1>
                    <div class="tjb_content box">
                        <!-- 轮播图 -->
                        <div class="tjb_fl_content">
                            <div class="tjb_fl_content_spner swiper-container">
                                <div class="swiper-wrapper">
                                    <div class="swiper-slide"><img src="../img/recomend1.jpeg" alt="优选推荐"></div>
                                    <div class="swiper-slide"><img style="height: 100%;" src="../img/recomend2.jpeg" alt="优选推荐"></div>
                                    <div class="swiper-slide"><img style="height: 100%;" src="../img/recomend3.jpeg" alt="优选推荐"></div>    
                                </div>
                                <!-- Add Pagination -->
                                <div class="swiper-pagination"></div>
                            </div>
                        </div>
                        
                        <div class="tjb_fr_content">
                            <ul>
                                <?php
                                $conditions = " `is_show`='1' AND `is_del`='0' AND `is_sp`='1'";
                                $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `product` WHERE ".$conditions." ORDER BY  `is_order` DESC,`sort_order`, `add_tm` DESC, `product_id` DESC LIMIT 10;";
                                $product_list = $db->getAll($sql);
                                foreach($product_list as $pk => $product):
                                    $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `product_pic` WHERE `product_id`='".$product['product_id']."' AND `ftype`=1 ORDER BY `is_order` DESC, `sort_order` LIMIT 1;";
                                    $pic = $db->getRow($sql);

                                    $gg_num = 0;

                                    $sql1 = "SELECT count(*) FROM `product_detail` WHERE `product_id`='".$product['product_id']."' AND `is_show`='1' AND `is_del`='0'";
                                    $sql1 .= " ORDER BY `pd_id`;";
                                    $gg_num = $db->getOne($sql1);
                                    $cate_arr = explode(',', $product['cate_ids']);
                                ?>
                                <li class="tjb_fr_content_li box">
                                    <a href="./proDetail.php?id=<?php echo $product["product_id"]; ?>&cate_id=<?php echo $cate_arr[0];?>">

                                        <div class="tjb_fr_content_img">
                                            <img src="<?php echo $domain; ?>/upload<?php echo $pic["pic400"]; ?>" alt="<?php echo $product["title"]; ?>">
                                        </div>
                                        <p class="tjb_fr_content_p ellipsis"><?php echo $product["title"]; ?></br><span>共有：<span style="color: red;font-weight: bold;"><?php echo $gg_num;?></span> 种规格，可选！</span></p>
                                        <div class="ytjq_btn box"><a href="./proDetail.php?id=<?php echo $product["product_id"]; ?>&cate_id=<?php echo $cate_arr[0];?>">立即查看</a></div>
                                    </a>
                                </li>
                                <?php endforeach;?>
                            </ul>
                        </div>
                    </div>
                </div>

                <!-- FA零部件 -->
                <?php   
                if(!empty($cate)):
                foreach($cate as $key1 => $cate1):  
                ?>
                    <div class="wrap_block falbj_block box">
                        <h1 class="box"><span class="tip_title"><?php echo $cate1['name']; ?></span><span  class="fl_else"><a href="./product.php?cate_id=<?php echo $cate1["list"][0]['cate_id']; ?>">所有分类></a></span>
                            <ul>
                                <?php foreach($cate1["list"] as $key2 => $cate2):  ?>
                                    <li <?php if ($key2 == 0): ?> class="ative_li" <?php endif; ?> ><a href="./product.php?cate_id=<?php echo $cate2["cate_id"] ?>"><?php echo $cate2['cate_name'];?></a></li>
                                <?php endforeach;?>
                            </ul>
                        </h1>
                        <div class="tjb_content box">
    
                            <div class="tjb_fr_content">
                                <ul>
                                    <?php   
                                    $cate = $cate1["list"][0];
                                    $cateId = $cate["cate_id"];
                                    $conditions = "`is_show`='1' AND `is_del`='0'";
                                    $conditions .= "  AND LOCATE(CONCAT(',', '".$cateId."', ','), CONCAT(',', cate_ids, ','))";
                                    $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `product` WHERE ".$conditions." ORDER BY  `is_order` DESC,`sort_order`, `add_tm` DESC, `product_id` DESC LIMIT 10;";
                                    $product_list = $db->getAll($sql);
                                    if(!$product_list){
                                        continue;
                                    }
                                    foreach($product_list as $pk => $product):
                                        $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `product_pic` WHERE `product_id`='".$product['product_id']."' AND `ftype`=1 ORDER BY `is_order` DESC, `sort_order` LIMIT 1;";
                                        $pic = $db->getRow($sql);

                                        $gg_num = 0;

                                        $sql1 = "SELECT count(*) FROM `product_detail` WHERE `product_id`='".$product['product_id']."' AND `is_show`='1' AND `is_del`='0'";
                                        $sql1 .= " ORDER BY `pd_id`;";
                                        $gg_num = $db->getOne($sql1);
                                    ?>
                                    <li class="falbj_content_li box">
                                        <a href="./proDetail.php?id=<?php echo $product["product_id"]; ?>&cate_id=<?php echo $cateId;?>">
                                            <div class="tjb_fr_content_img">
                                                <img src="<?php echo $domain; ?>/upload<?php echo $pic["pic400"]; ?>" alt="<?php echo $product["title"]; ?>">
                                            </div>
                                            <p class="tjb_fr_content_p ellipsis"><?php echo $product["title"]; ?></br><span>
                                                共有：<span style="color: red;font-weight: bold;"><?php echo $gg_num;?></span> 种规格，可选！
                                            </span></p>
                                        </a>
                                    </li>
                                    <?php endforeach;?>
                                </ul>
                            </div>
                        </div>
                    </div>
                <?php endforeach;?>
                <?php endif;?>

                

                <!-- 我们的优势 -->
                <div class="wrap_block wmys_block box">
                    <h2>我们的优势</h2>
                    <h3>Our advantages</h3>
                    <div class="wmys_content box">
                        <ul>
                            <li>
                                <div class="wmys_content_fl box">
                                    质量</br>可靠
                                </div>
                                <div class="wmys_content_fr">
                                    <p>90%标准件3天内发货 </p>
                                    <p>组装产品可按客户需求交付 </p>
                                    <p>定制品可按客户需求协商交期</p>
                                    <p>义文智能仓储，急速发货 </p>
                                </div>
                            </li>
                            <li>
                                <div class="wmys_content_fl box">
                                    快速</br>响应
                                </div>
                                <div class="wmys_content_fr">
                                    <p>FA零部件SKU110万+  </p>
                                    <p>超过197个大类2066个小类  </p>
                                    <p>非标来图定制 </p>
                                    <p>可按需求开发行业新产品 </p>
                                </div>
                            </li>
                            <li>
                                <div class="wmys_content_fl box">
                                    服务</br>上乘
                                </div>
                                <div class="wmys_content_fr">
                                    <p>行业优选精选，各大品牌引入 </p>
                                    <p>严格的内部质量管理体系  </p>
                                    <p>全方位的供应商质量管理体系 </p>
                                    <p>第三方检测认证，质量可靠  </p>
                                </div>
                            </li>
                            <li>
                                <div class="wmys_content_fl box">
                                    品牌</br>保证
                                </div>
                                <div class="wmys_content_fr">
                                    <p>全系列产品均有3D模型  </p>
                                    <p>计算选型支持，提升设计效率 </p>
                                    <p>精选案例/产品知识，助力方案设计</p>
                                    <p>售前支持，售后技术培训服务 </p>
                                </div>
                            </li>
                        </ul>

                    </div>
                </div>

                 <!-- 模块二 -->
                 <div class="firatwo_block">

                    <div class="anli_a_chanp" style="float: left; overflow:hidden; width: 800px; ">
                        <!-- 案例分享 -->
                        <div class="wrap_block alfx_block box">
                            <h1 class="box"><span class="tip_title">案例分享</span><span  class="fr_else"><a href="/new/news.php?cate_id=19">查看更多</a>></span></h1>
                            <div class="jsxx_content">
                                <div class="jsxx_fr_content">
                                    <ul>
                                        <?php
                                        $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `article` WHERE cate_id = 19 and is_del = 0 ORDER BY `add_tm` DESC, `article_id` limit 3;";
                                        if($_REQUEST['lp']) echo $sql;
                                        $article_list = $db->getAll($sql);
                                        ?>
                                        <?php
                                        if(!empty($article_list)):
                                        foreach($article_list as $key => $list):
                                        ?>
                                            <li>
                                                <a style="display: inherit;width: 100%;" href="/new/newsdetail.php?id=<?php echo $list['article_id'];?>" title="<?php echo $list['title'];?>">
                                                    <div class="jsxx_fr_menu">
                                                        <h2 class="ellipsis"><?php echo $list['title'];?></h2>
                                                        <p><?php echo $list['description'];?></p>
                                                    </div>
                                                    <div class="jsxx_fr_img">
                                                        <img src="/upload/<?php echo $list['pic'];?>" alt="<?php echo $list['title'];?>">
                                                    </div>
                                                </a>
                                            </li>
                                        <?php endforeach; ?>
                                        <?php endif; ?>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <!-- 产品说明 -->
                        <div class="wrap_block cpsm_block box">
                            <h1 class="box"><span class="tip_title">产品说明</span><span  class="fr_else"><a href="/new/news.php?cate_id=20">查看更多</a>></span></h1>
                            <div class="jsxx_content">
                                <div class="jsxx_fr_content">
                                    <ul>
                                        <?php
                                        $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `article` WHERE cate_id = 20 and is_del = 0 ORDER BY `add_tm` DESC, `article_id` limit 3;";
                                        if($_REQUEST['lp']) echo $sql;
                                        $article_list = $db->getAll($sql);
                                        ?>
                                        <?php
                                        if(!empty($article_list)):
                                        foreach($article_list as $key => $list):
                                        ?>
                                            <li>
                                                <a style="display: inherit;width: 100%;" href="/new/newsdetail.php?id=<?php echo $list['article_id'];?>" title="<?php echo $list['title'];?>">
                                                    <div class="jsxx_fr_menu">
                                                        <h2 class="ellipsis"><?php echo $list['title'];?></h2>
                                                        <p><?php echo $list['description'];?></p>
                                                    </div>
                                                    <div class="jsxx_fr_img">
                                                        <img src="/upload/<?php echo $list['pic'];?>" alt="<?php echo $list['title'];?>">
                                                    </div>
                                                </a>
                                            </li>
                                        <?php endforeach; ?>
                                        <?php endif; ?>
                                    </ul>
                                </div>
                            </div>
                            
                        </div>
                    </div>
                   

                    <!-- 产品上新 -->
                    <div class="wrap_block cpsx_block box">
                        <h1 class="box"><span class="tip_title">产品上新</span><span  class="fr_else"><a href="./news.php?cate_id=10">查看更多</a> ></span></h1>
                        <ul class="cpsx_content_ul">
                                <?php
                                $sql = "SELECT *,if(`sort_order` > '0',1,0) AS `is_order` FROM `article` WHERE cate_id = 10 and is_del = 0 ORDER BY `add_tm` DESC, `article_id` limit 3;";
                                if($_REQUEST['lp']) echo $sql;
                                $article_list = $db->getAll($sql);
                                ?>
                                <?php
                                if(!empty($article_list)):
                                foreach($article_list as $key => $list):
                                ?>
                                    <li class=" cpsx_content_li box" >
                                        <a style="display: inherit;" href="/new/newsdetail.php?id=<?php echo $list['article_id'];?>" title="<?php echo $list['title'];?>">
                                            <p  class="ellipsis"><?php echo $list['title'];?></p>
                                            <span><?php echo $list['update_tm'];?></span>
                                        </a>
                                        
                                    </li>
                                <?php endforeach; ?>
                                <?php endif; ?>
                        </ul>
                    </div>

                </div>

            </div>
<?php include('./footer.php');?>